package com.xidian.zhiancloud.service.accidentManage;

import com.xidian.zhiancloud.dao.AccidentStatisticMapper;
import com.xidian.zhiancloud.qo.accidentmessage.AccidentStatisticQO;
import com.xidian.zhiancloud.vo.accidentmessage.AccidentStatisticVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 统计图表业务层
 * @ClassName StatisticService
 * @Description TODO
 * @Author Halo
 **/
@Service
public class AccidentStatisticService {

    @Resource
    private AccidentStatisticMapper accidentStatisticMapper;

    /**
     * 根据事故类型进行统计
     * @param accidentStatisticQO
     * @return
     */
    public List<AccidentStatisticVO> statisticByType(AccidentStatisticQO accidentStatisticQO){
        return accidentStatisticMapper.statisticByType(accidentStatisticQO);
    }

    /**
     * 根据事故等级进行统计
     * @param accidentStatisticQO
     * @return
     */
    public List<AccidentStatisticVO> statisticByRank(AccidentStatisticQO accidentStatisticQO){
        return accidentStatisticMapper.statisticByRank(accidentStatisticQO);
    }

    /**
     * 根部责任部门进行统计
     * @param accidentStatisticQO
     * @return
     */
    public List<AccidentStatisticVO> statisticByDepartment(AccidentStatisticQO accidentStatisticQO){
        return accidentStatisticMapper.statisticByDepartment(accidentStatisticQO);
    }

}
